'''
Created on Apr 1, 2012

@author: Johnathon
'''
from LineValues import Zero
from Gates.Gate import Gate

class XnorGate(Gate):
    '''
    classdocs
    '''


    def __init__(self, gateName, level, inputLines, outputLine):
        '''
        Constructor
        '''
        super(XnorGate, self).__init__(gateName, level, inputLines, outputLine)
#        self.gateName = gateName
#        self.level = level
#        self.inputs = inputLines
#        self.output = outputLine
        
    def evaluate(self):
        result = Zero
        for inputVal in self.inputs:
            result = inputVal.value.XOR(result)
        if self.output is not None:
            self.output.driveValue(result.NOT())
            
    def getEquivalentFaults(self):
        return []